<template>
  <router-link :to="{name:'positionDetail',query:{id:data.id,jobType:data.jobType}}" class="position-item">
    <div class="info-block">
      <div class="position-name-block">
        <div class="position-name">{{data.jobTitle }}</div>
        <div v-if="data.salaryNegotiable===0" class="position-wage">{{data.minSalary}}-{{data.maxSalary}}元</div>
        <div v-if="data.salaryNegotiable===1" class="position-wage">面议</div>
      </div>
      <div class="position-label-block" v-if="data.comRecruiters.enterprise.welfareList.length>0">
        <div class="position-label-item" v-for="(item1,index) in data.comRecruiters.enterprise.welfareList">
          <div v-if="item1!=='null'">{{ item1 }}</div>
          <div v-else>面议</div>
        </div>
      </div>
      <div class="position-label-block" v-else>
        <div class="position-label-item">
          面议
        </div>
      </div>
      <div class="company-block">
        <img :src="data.comRecruiters.enterprise.logoUrl" alt="" class="company-photo">
        <div class="name">{{data.comRecruiters.enterprise.enterpriseName}}</div>
<!--        <div class="industry">{{data.jobDescription}}</div>-->
        <div class="scale" v-if="data.comRecruiters.enterprise.scaleName">{{data.comRecruiters.enterprise.scaleName}}</div>
      </div>
    </div>
    <div class="hr-block">
      <img class="photo" alt="" :src="data.comRecruiters.user.faceUrl" >
      <div class="name">{{data.comRecruiters.realName}}</div>
    </div>
  </router-link>
</template>

<script>
export default {
  name: "PositionItemRow",
  props: {
    data: Object
  },
  methods:{
  }
}
</script>

<style lang="scss" scoped>
.position-item {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
  align-items: center;
  .info-block{
    width:calc(100% - 120px);
    height: 100%;
    display: flex;
    flex-direction: column;
    .position-name-block{
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-bottom: 15px;
      .position-name{
        font-size: 19px;
        font-weight: bold;
        margin-right: 20px;
      }
      .position-wage{
        font-size: 17px;
        font-weight: bold;
        color: $orange;
      }
    }
    .position-label-block {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;

      .position-label-item {
        margin-right: 10px;
        margin-bottom: 10px;
        color: $darkGray;
        background: $lightGray;
        padding: 4px 8px;
        font-size: 13px;
      }
    }
    .company-block{
      display: flex;
      flex-direction: row;
      align-items: center;
      font-size: 14px;
      .company-photo{
        width: 25px;
        height: 25px;
        margin-right: 10px;
      }
      >div{
        margin-right: 20px;
      }
      .industry,.scale{
        color: $darkGray;
      }
    }
  }
  .hr-block{
    width: 120px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    .photo{
      width: 55px;
      height: 55px;
      border-radius: 50%;
    }
    .name{
      margin-top: 10px;
      font-size: 14px;
    }
  }
}
.position-item:hover {
  box-shadow: 0 16px 32px 0 rgba(48, 55, 66, 0.15);/* 盒子悬浮时阴影 */
}

</style>
